package v1

import (
	"github.com/gin-gonic/gin"
	"wrblog-api-go/app/api/v1/api_auth"
	"wrblog-api-go/app/common/token"
	"wrblog-api-go/pkg/request"
)

func WrAuthApi(apiV1 *gin.RouterGroup) {
	//获取列表
	authApi := apiV1.Group("/auth")
	{
		authApi.GET("/getImgCode", api_auth.ApiImgCode)
		authApi.GET("/getPublicKey", api_auth.ApiPublicKey)
		authApi.POST("/loginKey", request.BindAllStruct[token.LoginForm](), api_auth.ApiLoginKey)
		authApi.GET("/logout", api_auth.ApiLogout)
		authApi.POST("/registerKey", request.BindAllStruct[token.RegisterForm](), api_auth.ApiRegisterKey)
	}
}
